<table class="layui-table" style="width:3500px;" id="contentTab">
 	<input type="hidden" id="billid" th:value="${InboundOrder.id}"/>
 	<input type="hidden" id="billno" th:value="${InboundOrder.orderNo}"/>
 	<input type="hidden" id="companyid" th:value="${InboundOrder.companyId}"/>
 	<input type="hidden" id="sourceOrderNo" th:value="${InboundOrder.sourceOrderNo}"/>
 	<input type="hidden" id="supplierid" th:value="${InboundOrder.supplyId}"/>
 	<input type="hidden" id="sourceOrderId" th:value="${InboundOrder.sourceOrderId}"/>
  <thead>
  	
    <tr>
    	 <th><input type="checkBox" lay-skin="primary" name="headCheckBox" lay-filter="headCheckBox"/></th>
      	 <th>请购单ID</th>
		 <th>物料编码</th>
		 <th>物料名称</th>
		 <th>物料规格</th>
		 <th>物料类型</th>
		 <th>品牌</th>
		 <th>计量单位</th>
		 <th>入库仓</th>
		 <th>供应商物料编码</th>
		 <th>供应商物料名称</th>
		 <th>供应商物料规格</th>
<!-- 		 <th>结算方式</th> -->
<!-- 		 <th>结算天数</th> -->
<!-- 		 <th>结算币种</th> -->
<!-- 		 <th>汇率</th> -->
<!-- 		 <th>税率</th> -->
<!-- 		 <th>采购数量</th> -->
		 <th>单价</th>
<!-- 		 <th>含税单价</th> -->
<!-- 		 <th>未含税费用</th> -->
<!-- 		 <th>税额</th> -->
<!-- 		 <th>含税费用</th> -->
<!-- 		 <th>需求日期</th> -->
		 <th>应收数量</th>
		 <th>已收数量</th>
		 <th>本次数量</th>
		 <th>是否赠品</th>
		 <th>到货时间</th>
    </tr>
     </thead>
    <tbody>
   
    <tr th:each="item : ${details}" class="edittr">
    	<td><input type="checkBox" lay-skin="primary" name="trCheckBox"/></td>
		<td style="width:150px;"><input type="hidden" name="id" th:value="${item.id}"/><span th:text="${item.sourceOrderNo}"></span></td>
		<td style="width:150px;padding-left:0px;padding-right:0px;">
			<input type="text" name="materialCode" class="layui-input" style="width:150px;" th:value="${item.materiaCode}"/>
			<input type="hidden" name="materialId" class="layui-input" style="width:150px;" th:value="${item.materiaId}"/>
		</td>
		<td name='name' style="background-color:#f3f2f2;width:200px;" th:text="${item.materiaName}"></td>
		<td name='spec' style="background-color:#f3f2f2" th:text="${item.materiaSpec}"></td>
		<td name="type" style="background-color:#f3f2f2" th:text="${item.materiaType}"></td>
		<td name="brand" style="background-color:#f3f2f2" th:text="${item.brand}"></td>
		<td name="measureUnit" style="background-color:#f3f2f2" th:text="${item.measurementUnit}"></td>
		<td style="background-color:#f3f2f2;padding-left:0px;padding-right:0px;width:120px;">
			<select name="storeageId" lay-filter="storeage" >
<!-- 				<option value="">请选择仓库</option> -->
				<option th:each="s : ${stockStore}" th:attr="value=${s.id}" th:text="${s.name}" th:selected="(${item.storeageId}==${s.id})"></option>
		    </select>
		</td>
		<td name="sup_code" style="background-color:#f3f2f2" th:text="${item.supplierMateriaCode}"></td>
		<td name="sup_name" style="background-color:#f3f2f2" th:text="${item.supplierMateriaName}"></td>
		<td name="sup_spec" style="background-color:#f3f2f2" th:text="${item.supplierMateriaSpec}"></td>
<!-- 		<td style="background-color:#f3f2f2;padding-left:0px;padding-right:0px;width:120px;"> -->
<!-- 			<select name="statementTypeId" lay-filter="statementTypeId" > -->
<!-- 		    	<option th:each="s:${statements}" th:value="${s.id}" th:text="${s.statementType}" th:selected="(${s.id} == ${item.settlementId})" th:attr="data-currencyName=${s.currencyName},data-days=${s.dates},data-exchargeRate=${s.exchangeRate}"></option> -->
<!-- 		    </select> -->
<!-- 		</td> -->
<!-- 		<td style="background-color:#f3f2f2" name="settlementDay"><span th:text="${item.settlementDay}"></span></td> -->
<!-- 		<td style="background-color:#f3f2f2" name="settlementCurrency"><span th:text="${item.settlementCurrency}"></span></td> -->
<!-- 		<td style="background-color:#f3f2f2" name="settlementExchangeRate"><span th:text="${item.exchargeRate}"></span></td> -->
<!-- 		<td style="background-color:#f3f2f2" name="taxRate"><span th:text="${item.taxRate}"></span>%</td> -->
<!-- 		<td style="padding-left:0px;padding-right:0px;width:120px;"><input style="width:120px;" type="text" name="num" required  lay-verify="required|number" placeholder="采购数量" autocomplete="off" class="layui-input" th:value="${item.num}"/></td> -->
		<td style="padding-left:0px;padding-right:0px;width:80px;"><input readonly style="width:80px;" type="text" name="price" required  lay-verify="number" placeholder="单价" autocomplete="off" class="layui-input" th:value="${item.price}"/></td>
<!-- 		<td name="taxPrice" style="background-color:#f3f2f2"><span th:text="${item.inclusivePrice}"></span></td> -->
<!-- 		<td name='excludingTaxPriceTotal' style="background-color:#f3f2f2"><span th:text="${item.taxExcludedTotal}"></span></td> -->
<!-- 		<td name="tax" style="background-color:#f3f2f2"><span th:text="${item.tax}"></span></td> -->
<!-- 		<td name="totalPrice" style="background-color:#f3f2f2"><span th:text="${item.inclusiveTotal}"></span></td> -->
<!-- 		<td><span th:text="${#dates.format(item.requireDate, 'yyyy-MM-dd HH:mm:ss')}"></span></td> -->
<!-- 		<td><span th:text="${item.reAccount}"></span></td> -->
<!-- 		<td><span th:text="${item.actualDelivery}"></span></td> -->
<!-- 		<td name="actual_account" th:text="${item.acAccount}"></td> -->
		<td style="padding-left:0px;padding-right:0px;width:80px;"><input readonly type="text" name="reAccount" required  lay-verify="number"  autocomplete="off" class="layui-input" th:value="${item.reAccount}"></td>
		<td style="padding-left:0px;padding-right:0px;width:80px;"><input readonly type="text" name="actualDelivery" required  lay-verify="number"  autocomplete="off" class="layui-input" th:value="${item.actualDelivery}"></td>
		<td style="padding-left:0px;padding-right:0px;width:80px;"><input  type="text" name="acAccount" required  lay-verify="number" placeholder="本次数量" autocomplete="off" class="layui-input" th:value="${item.acAccount}"></td>
		<td style="padding-left:0px;padding-right:0px;width:80px;">
			<select  style="width:30px;" name="isGift" lay-filter="isGift"  >
			<option th:value="${item.isGift}" th:text="${item.isGift}==0?否:是"></option>
			<option th:value="${item.isGift}==0?1:0" th:text="${item.isGift}==0?是:否"></option>
		</select>
		</td>
		<td style="padding-left:0px;padding-right:0px;width:80px;">
			<input  type="text" class="layui-input laydate-icon" name="toRecord" id="toRecord" th:value="${item.toRecord}" readonly>
		</td>
	</tr>
	</tbody>
</table>
<table style="display:none;" id="blankTpl">
<tbody>
<tr class="edittr">
		<td><input type="checkBox" lay-skin="primary" name="trCheckBox" lay-filter="trCheckBox"/></td>
		<td style="width:50px"><input type="hidden" name="id" value=""/><span th:text="${InboundOrder.orderNo}"></span></td>
		<td style="width:150px;padding-left:0px;padding-right:0px;">
			<input type="text" name="materialCode" class="layui-input" style="width:150px;" value=""/>
			<input type="hidden" name="materialId" class="layui-input" style="width:150px;" value=""/>
		</td>
		<td name='name' style="background-color:#f3f2f2;width:200px;"><span></span></td>
		<td name='spec' style="background-color:#f3f2f2"></td>
		<td name="type" style="background-color:#f3f2f2"></td>
		<td name="brand" style="background-color:#f3f2f2"></td>
		<td name="measureUnit" style="background-color:#f3f2f2"></td>
		<td style="background-color:#f3f2f2;padding-left:0px;padding-right:0px;width:120px;">
			<select name="storeageId" lay-filter="storeage">
				<option value="-1">请选择仓库</option>
				<option th:each="s : ${stockStore}" th:attr="value=${s.id}" th:text="${s.name}" ></option>
		    </select>
		</td>
		<td name="sup_code" style="background-color:#f3f2f2"></td>
		<td name="sup_name" style="background-color:#f3f2f2"></td>
		<td name="sup_spec" style="background-color:#f3f2f2"></td>
<!-- 		<td style="background-color:#f3f2f2;padding-left:0px;padding-right:0px;width:120px;"> -->
<!-- 			<select name="statementTypeId" lay-filter="statementTypeId"> -->
<!-- 				<option th:each="s:${statements}" th:value="${s.id}" th:text="${s.statementType}" th:selected="(${s.isDefault}==1)" th:attr="data-currencyName=${s.currencyName},data-days=${s.dates},data-exchargeRate=${s.exchangeRate}"></option> -->
<!-- 			</select> -->
<!-- 		</td> -->
<!-- 		<td style="background-color:#f3f2f2" name="settlementDay"><span th:text="${defaultStatement.dates}"></span></td> -->
<!-- 		<td style="background-color:#f3f2f2" name="settlementCurrency"><span th:text="${defaultStatement.currencyName}"></span></td> -->
<!-- 		<td style="background-color:#f3f2f2" name="settlementExchangeRate"><span th:text="${defaultStatement.exchangeRate}"></span></td> -->
<!-- 		<td style="background-color:#f3f2f2" name="taxRate"><span th:text="${taxInfo.value}"></span>%</td> -->
<!-- 		<td style="padding-left:0px;padding-right:0px;width:120px;"><input style="width:120px;" type="text" name="num" required  lay-verify="required|number" placeholder="采购数量" autocomplete="off" class="layui-input"></td> -->
		<td style="padding-left:0px;padding-right:0px;width:80px;"><input style="width:80px;" type="text" name="price" required  lay-verify="required|number" placeholder="单价" autocomplete="off" class="layui-input"></td>
<!-- 		<td name="taxPrice" style="background-color:#f3f2f2"><span></span></td> -->
<!-- 		<td name='excludingTaxPriceTotal' style="background-color:#f3f2f2"><span></span></td> -->
<!-- 		<td name="tax" style="background-color:#f3f2f2"><span></span></td> -->
<!-- 		<td name="totalPrice" style="background-color:#f3f2f2"><span></span></td> -->
<!-- 		<td></td> -->
		<td style="padding-left:0px;padding-right:0px;width:80px;"><input  type="text" name="reAccount" required  lay-verify="required|number" placeholder="应收数量" autocomplete="off" class="layui-input"></td>
		<td style="padding-left:0px;padding-right:0px;width:80px;"><input  type="text" name="actualDelivery" required  lay-verify="required|number" placeholder="已收数量" autocomplete="off" class="layui-input"></td>
		<td style="padding-left:0px;padding-right:0px;width:80px;"><input  type="text" name="acAccount" required  lay-verify="required|number" placeholder="本次数量" autocomplete="off" class="layui-input"></td>
		<td style="padding-left:0px;padding-right:0px;width:30px;">
		<select  style="width:80px;" name="isGift" lay-filter="isGift"  >
			<option value ='0' selected="selected">否</option>
			<option value ='1'>是</option>
		</select>
		</td>
		<td style="padding-left:0px;padding-right:0px;width:80px;">
			<input  type="text" class="layui-input laydate-icon" name="toRecord" id="toRecord" readonly>
		</td>
	</tr>
	</tbody>
</table>
<script>
layui.use('laydate', function(){
var laydate = layui.laydate;
lay('#toRecord').each(function(){
    laydate.render({
      elem: this
      ,trigger: 'click'
    });
  });
});
</script>